\(\int x^{-1+n} (b+2 c x^n) (b x^n+c x^{2 n})^p \, dx\) [140]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 26 \[ \int x^{-1+n} \left (b+2 c x^n\right ) \left (b x^n+c x^{2 n}\right )^p \, dx=\frac {\left (b x^n+c x^{2 n}\right )^{1+p}}{n (1+p)} \]

[Out]

(b*x^n+c*x^(2*n))^(p+1)/n/(p+1)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2059, 643} \[ \int x^{-1+n} \left (b+2 c x^n\right ) \left (b x^n+c x^{2 n}\right )^p \, dx=\frac {\left (b x^n+c x^{2 n}\right )^{p+1}}{n (p+1)} \]

[In]

Int[x^(-1 + n)*(b + 2*c*x^n)*(b*x^n + c*x^(2*n))^p,x]

[Out]

(b*x^n + c*x^(2*n))^(1 + p)/(n*(1 + p))

Rule 643

Int[((d_) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[d*((a + b*x + c*x^2)^(p +
 1)/(b*(p + 1))), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rule 2059

Int[(x_)^(m_.)*((b_.)*(x_)^(k_.) + (a_.)*(x_)^(j_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n
, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a*x^Simplify[j/n] + b*x^Simplify[k/n])^p*(c + d*x)^q, x], x, x^n], x]
 /; FreeQ[{a, b, c, d, j, k, m, n, p, q}, x] &&  !IntegerQ[p] && NeQ[k, j] && IntegerQ[Simplify[j/n]] && Integ
erQ[Simplify[k/n]] && IntegerQ[Simplify[(m + 1)/n]] && NeQ[n^2, 1]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int (b+2 c x) \left (b x+c x^2\right )^p \, dx,x,x^n\right )}{n} \\ & = \frac {\left (b x^n+c x^{2 n}\right )^{1+p}}{n (1+p)} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.11 (sec) , antiderivative size = 111, normalized size of antiderivative = 4.27 \[ \int x^{-1+n} \left (b+2 c x^n\right ) \left (b x^n+c x^{2 n}\right )^p \, dx=\frac {x^{-n p} \left (x^n \left (b+c x^n\right )\right )^p \left (1+\frac {c x^n}{b}\right )^{-p} \left (b (2+p) x^{n (1+p)} \operatorname {Hypergeometric2F1}\left (-p,1+p,2+p,-\frac {c x^n}{b}\right )+2 c (1+p) x^{n (2+p)} \operatorname {Hypergeometric2F1}\left (-p,2+p,3+p,-\frac {c x^n}{b}\right )\right )}{n (1+p) (2+p)} \]

[In]

Integrate[x^(-1 + n)*(b + 2*c*x^n)*(b*x^n + c*x^(2*n))^p,x]

[Out]

((x^n*(b + c*x^n))^p*(b*(2 + p)*x^(n*(1 + p))*Hypergeometric2F1[-p, 1 + p, 2 + p, -((c*x^n)/b)] + 2*c*(1 + p)*
x^(n*(2 + p))*Hypergeometric2F1[-p, 2 + p, 3 + p, -((c*x^n)/b)]))/(n*(1 + p)*(2 + p)*x^(n*p)*(1 + (c*x^n)/b)^p
)

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 29.09 (sec) , antiderivative size = 106, normalized size of antiderivative = 4.08

method result size
risch \(\frac {x^{n} \left (b +c \,x^{n}\right ) \left (x^{n}\right )^{p} \left (b +c \,x^{n}\right )^{p} {\mathrm e}^{-\frac {i \operatorname {csgn}\left (i x^{n} \left (b +c \,x^{n}\right )\right ) \pi p \left (-\operatorname {csgn}\left (i x^{n} \left (b +c \,x^{n}\right )\right )+\operatorname {csgn}\left (i x^{n}\right )\right ) \left (-\operatorname {csgn}\left (i x^{n} \left (b +c \,x^{n}\right )\right )+\operatorname {csgn}\left (i \left (b +c \,x^{n}\right )\right )\right )}{2}}}{n \left (1+p \right )}\) \(106\)

[In]

int(x^(-1+n)*(b+2*c*x^n)*(b*x^n+c*x^(2*n))^p,x,method=_RETURNVERBOSE)

[Out]

x^n*(b+c*x^n)/n/(1+p)*(x^n)^p*(b+c*x^n)^p*exp(-1/2*I*csgn(I*x^n*(b+c*x^n))*Pi*p*(-csgn(I*x^n*(b+c*x^n))+csgn(I
*x^n))*(-csgn(I*x^n*(b+c*x^n))+csgn(I*(b+c*x^n))))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.38 \[ \int x^{-1+n} \left (b+2 c x^n\right ) \left (b x^n+c x^{2 n}\right )^p \, dx=\frac {{\left (c x^{2 \, n} + b x^{n}\right )} {\left (c x^{2 \, n} + b x^{n}\right )}^{p}}{n p + n} \]

[In]

integrate(x^(-1+n)*(b+2*c*x^n)*(b*x^n+c*x^(2*n))^p,x, algorithm="fricas")

[Out]

(c*x^(2*n) + b*x^n)*(c*x^(2*n) + b*x^n)^p/(n*p + n)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (19) = 38\).

Time = 11.07 (sec) , antiderivative size = 100, normalized size of antiderivative = 3.85 \[ \int x^{-1+n} \left (b+2 c x^n\right ) \left (b x^n+c x^{2 n}\right )^p \, dx=\begin {cases} \frac {\left (b + 2 c\right ) \log {\left (x \right )}}{b + c} & \text {for}\: n = 0 \wedge p = -1 \\\left (b + c\right )^{p} \left (b + 2 c\right ) \log {\left (x \right )} & \text {for}\: n = 0 \\\frac {\log {\left (x^{n} \right )}}{n} + \frac {\log {\left (\frac {b}{c} + x^{n} \right )}}{n} & \text {for}\: p = -1 \\\frac {b x x^{n - 1} \left (b x^{n} + c x^{2 n}\right )^{p}}{n p + n} + \frac {c x x^{n} x^{n - 1} \left (b x^{n} + c x^{2 n}\right )^{p}}{n p + n} & \text {otherwise} \end {cases} \]

[In]

integrate(x**(-1+n)*(b+2*c*x**n)*(b*x**n+c*x**(2*n))**p,x)

[Out]

Piecewise(((b + 2*c)*log(x)/(b + c), Eq(n, 0) & Eq(p, -1)), ((b + c)**p*(b + 2*c)*log(x), Eq(n, 0)), (log(x**n
)/n + log(b/c + x**n)/n, Eq(p, -1)), (b*x*x**(n - 1)*(b*x**n + c*x**(2*n))**p/(n*p + n) + c*x*x**n*x**(n - 1)*
(b*x**n + c*x**(2*n))**p/(n*p + n), True))

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.54 \[ \int x^{-1+n} \left (b+2 c x^n\right ) \left (b x^n+c x^{2 n}\right )^p \, dx=\frac {{\left (c x^{2 \, n} + b x^{n}\right )} e^{\left (p \log \left (c x^{n} + b\right ) + p \log \left (x^{n}\right )\right )}}{n {\left (p + 1\right )}} \]

[In]

integrate(x^(-1+n)*(b+2*c*x^n)*(b*x^n+c*x^(2*n))^p,x, algorithm="maxima")

[Out]

(c*x^(2*n) + b*x^n)*e^(p*log(c*x^n + b) + p*log(x^n))/(n*(p + 1))

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int x^{-1+n} \left (b+2 c x^n\right ) \left (b x^n+c x^{2 n}\right )^p \, dx=\frac {{\left (c x^{2 \, n} + b x^{n}\right )}^{p + 1}}{n {\left (p + 1\right )}} \]

[In]

integrate(x^(-1+n)*(b+2*c*x^n)*(b*x^n+c*x^(2*n))^p,x, algorithm="giac")

[Out]

(c*x^(2*n) + b*x^n)^(p + 1)/(n*(p + 1))

Mupad [B] (verification not implemented)

Time = 8.64 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.31 \[ \int x^{-1+n} \left (b+2 c x^n\right ) \left (b x^n+c x^{2 n}\right )^p \, dx=\frac {x^n\,\left (b+c\,x^n\right )\,{\left (b\,x^n+c\,x^{2\,n}\right )}^p}{n\,\left (p+1\right )} \]

[In]

int(x^(n - 1)*(b + 2*c*x^n)*(b*x^n + c*x^(2*n))^p,x)

[Out]

(x^n*(b + c*x^n)*(b*x^n + c*x^(2*n))^p)/(n*(p + 1))